/*
 * 物流伙伴
*/
import httpRequest from '@/utils/httpRequest'
/*
 * 物流伙伴列表
 * */
export function getCompanyList (data) {
  return httpRequest({
    url: '/basis/sales/company/list',
    method: 'get',
    params: data
  })
}
/*
 * 获取电话号
 * params={
 * 	companyId
 * }
 * */
export function getPhoneByCompanyId (data) {
  return httpRequest({
    url: '/basis/sales/company/searchListNoMeCompany',
    method: 'get',
    params: data
  })
}
/*
 * 发送短信
 * params={
 * 	contactPhone 
 * 	source:3
 * 	captchaTemplate:0
 * }
 * */
export function sendCaptcha (data) {
  return httpRequest({
    url: '/basis/sales/company/sendCaptcha',
    method: 'post',
    data: data,
    headers: {'Content-Type': 'application/json; charset=utf-8'}
  })
}
/*
 * 保存物流伙伴
 * params={
 * 	companyId 
 * 	contactPhone
 * 	captcha
 * }
 * */
export function saveCompany (data) {
  return httpRequest({
    url: '/basis/sales/company/saveCompanyTree',
    method: 'post',
    headers: {'Content-Type': 'application/json; charset=utf-8'},
    data: data
  })
}

/*
 * 验证物流伙伴
 * params={
 * 	companyId 
 * 	contactPhone
 * 	captcha
 * }
 * */
export function verifyCompany (data) {
  return httpRequest({
    url: '/basis/sales/company/saveCompanyTreeVerification',
    method: 'post',
    headers: {'Content-Type': 'application/json; charset=utf-8'},
    data: data
  })
}

/*
 * 删除物流伙伴
 * params={
 * 	ids
 * }
 * */
export function delCrm (data) {
  return httpRequest({
    url: '/basis/sales/company/delete',
    method: 'post',
    data: data
  })
}

/*
 * 修改物流伙伴状态（启用停用）
 * params={
 * 	id
 * 	state
 * }
 * */
export function editState (data) {
  return httpRequest({
    url: '/basis/sales/company/updateStatusTree',
    method: 'post',
    data: data,
    headers: {'Content-Type': 'application/json; charset=utf-8'}
  })
}